/*
 * Matrix.h
 *
 *  Created on: Feb 15, 2011
 *      Author: Anton
 */

#ifndef MATRIX_H_
#define MATRIX_H_

#include <stdarg.h>
#include <vector>
#include <iostream>
#include <math.h>
using std::ostream;
using std::endl;
using std::cout;

class Matrix {
private:
	int dx, dy; //Sizes of the matrix
	double **array; //Point to memory you will allocate using "new"

public:
	Matrix();
	Matrix(const Matrix &);
	Matrix(int, int, ...);
	virtual ~Matrix();
	void print();

	Matrix transMatrix();
	friend Matrix operator*( Matrix& lhs, Matrix& rhs);
	friend Matrix operator+( Matrix& lhs, Matrix& rhs);
	friend Matrix operator-( Matrix& lhs, Matrix& rhs);
	Matrix& operator=(const Matrix& rhs);

	void setvalue(int x, int y, double val);

	double getvalue(int x, int y);
	int getX();
	int getY();
	void resize(int, int);
	friend ostream &operator<<(ostream &stream, Matrix &m);
};


#endif /* MATRIX_H_ */
